package com.szholly.pro.watergas_server.ps.data;

import java.util.HashMap;

import com.szholly.data.general.metadata.table.DefulatDomainTable;import org.springframework.stereotype.Component;import com.szholly.data.general.Field;import com.szholly.data.general.InterceptorTableBase;import com.szholly.data.general.metadata.IBaseTable;import com.szholly.utils.spring.SpringBeanFactory;import org.springframework.stereotype.Component;import com.szholly.data.general.GlobalDataType;import com.szholly.data.general.RowBase;import com.szholly.data.general.metadata.table.DefulatDomainTable;

/**
 * OperationJob
 */
@Component("PollData")
public class PollDataTable extends InterceptorTableBase  implements IBaseTable{

	public final static String TABLE_NAME = "POLLDATA";
	
	/**
	 * single ref
	 */
	public static PollDataTable getSingleRef() {
		return (PollDataTable) SpringBeanFactory.getBean("POLLDATA");
	}

	@Override
	public String getMetadataTableName() {
		return TABLE_NAME;
	}

	@Override
	public String getMetadataTableAliasName() {
		return "PollData";
	}

	private HashMap<String, Field> fields;

	@Override
	protected HashMap<String, Field> fields() {
		if (fields == null) {
			fields = new HashMap<String, Field>();

			Field itemField = new Field();
			itemField.setFieldName(PollDataRow.FIELD_Parmnane);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(1);
			itemField.setFieldAliasName("PARMNAME");
			itemField.setCanShow(false);
			itemField.setCodeTablePK(DefulatDomainTable.TABLE_NAME);
			itemField.setCodeDomainName("MONITOR_PARAM");
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);	
		}
		return fields;
	}

	@Override
	public String getTableGroup() {
		return "POLLDATA";
	}
}